<!DOCTYPE html PUBLIC "">
<html xmlns="">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title>推送列表</title>

    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <!-- page specific plugin styles -->
    <script src="__PUBLIC__/admin/js/jquery.min.js"></script>
    <script src="__PUBLIC__/admin/js/lodash.min.js"></script>
    <script src="__PUBLIC__/admin/js/moment.min.js"></script>
    <script src="__PUBLIC__/admin/js/zh-cn.js"></script>
    <script src="__PUBLIC__/admin/js/numeral.min.js"></script>
    <script src="__PUBLIC__/admin/js/toastr.min.js"></script>
    <script src="__PUBLIC__/admin/js/cookies.js"></script>
    <script src="__PUBLIC__/admin/js/knockout-min.js"></script>
    <script src="__PUBLIC__/admin/js/knockout.mapping.min.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap-datetimepicker.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.unobtrusive.min.js"></script>
    <script src="__PUBLIC__/admin/js/clipboard.min.js"></script>
    <script src="__PUBLIC__/admin/js/select2.min.js"></script>
    <script src="__PUBLIC__/admin/js/zh-cn_001.js"></script>
    <script src="__PUBLIC__/admin/js/admin.js"></script>
    <script>
      moment.locale('zh-cn');

      toastr.options.positionClass = 'toast-bottom-right';

      $.fn.select2.defaults.set('language', 'zh-CN');
    </script>

    <!-- ace settings handler -->
    <script src="__PUBLIC__/admin/js/ace-extra.min.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/glyphicons-halflings-regular.css">
<link media="all" href="__PUBLIC__/admin/css/index16.css" type="text/css" rel="stylesheet">
</head>
<body class="no-skin modal-open" style="padding-right: 17px;">

    <!-- #section:basics/navbar.layout -->
    <include file="./Public/gong/title.html" />

    <div class="main-container" id="main-container">
      <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
      </script>

      <div id="sidebar" class="sidebar responsive">
          <script type="text/javascript">
            try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
          </script>

<include file="./Public/gong/list.html" />
          <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
          </div>

          <script type="text/javascript">
            try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
          </script>
      </div>
      <!-- /section:basics/sidebar -->
      <div class="main-content">
        <div class="breadcrumbs" id="breadcrumbs">
          <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
          </script>

          <ul class="breadcrumb">
            <li>
              <i class="ace-icon fa fa-home home-icon"></i>
              <a href="__APP__/Admin/Index/index.html">Home</a>
            </li>
            <li class="active">推送列表</li>
          </ul>
        </div>
        <div class="page-content">
          <div class="page-content-area">
            <div class="row">
              <div class="col-xs-12">
<div class="actions-bar">
    <button type="button" class="btn btn-primary" data-toggle="add-keyword"><i class="fa fa-plus"></i>添加推送</button>
</div>

<table class="table table-bordered table-stripped">
    <thead>
    <tr>
        <th>标题</th>
        <th>内容</th>
        <th>书id/h5链接</th>
        <td>类型</td>
        <th>时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
        <volist name="jpush" id="vk">
            <tr class="data-item" data-referral-link-id="196087">
                <td>
                    {$vk.title}
                    </div>
                </td>
                <td>
                    <span class="counter-field" data-field="clicks">{$vk.content}</span>
                </td>
                <td>
                    {$vk.bid}
                </td>
                <td>
                    <if condition="$vk[typeid] eq '1' ">
                        书城
                    <elseif condition="$vk[typeid] eq '2' "/> 
                        h5 
                    <elseif condition="$vk[typeid] eq '3' "/>
                        空
                    <elseif condition="$vk[typeid] eq '4' "/> 
                        任务列表
                    </if>
                </td>
                <td>
                    {$vk.add_time}
                </td>
                <td class="text-center">
                    <a class="btn btn-xs btn-success" href="__URL__/del_reply_keywords?id={$vk.id}" onclick="javascript:return jpush_del()"><i class="fa fa-list"></i> 删除</a>
                </td>
            </tr>
        </volist>
    </tbody>
</table>


<div  id="edit-keyword" style="display:none;position: fixed;top: 0px;right: 0px;bottom: 0px;left: 0px;z-index: 1050;display: none;overflow: hidden;outline: 0px none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-bind="click: close" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">推送内容设置</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" novalidate="novalidate" method="POST" action="{:U('jpush')}">
                    <div class="form-group">
                        <label class="control-label col-sm-3">标题</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="title" data-bind="value: keyword" maxlength="20" data-val="true" data-val-required="标题">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">内容</label>
                         <div class="col-sm-7">
                             <textarea rows="3" cols="40" style="margin: 0px;" type="text" name="content"/></textarea>
                         </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">书ID或H5跳转地址</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="bid" data-bind="value: keyword" maxlength="20" data-val="true" data-val-required="书ID或H5跳转地址">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">类型</label>
                        <div class="col-sm-7">
                            <label class="radio-inline">
                                <input type="radio"  name="typeid" value="1" >书城
                            </label>
                            <label class="radio-inline">
                                <input type="radio"  name="typeid"value="2" >h5
                            </label>
                            <label class="radio-inline">
                                <input type="radio"  name="typeid" value="3" >空
                            </label>
                            <label class="radio-inline">
                                <input type="radio"  name="typeid" value="4" >任务列表
                            </label>
                        </div>
                    </div>
            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>
            </form>
        </div>
    </div>
</div>
<script >
    $(function(){
            $(".btn-primary").click(function(){
                $("#edit-keyword").css({'display':'block'});
                $(".modal-backdrop").css({'display':'block'});
            });
            $(".close").click(function(){
                $("#edit-keyword").css({'display':'none'});
                $(".modal-backdrop").css({'display':'none'});
            });
    });
</script>
<script type="text/javascript">
$('#s1').change(function(event) {
    var $bid = $(this).val();
    $('#s2').empty();
    $.get('__URL__/selectbookinfo',{'bid':$bid},function(data) {
        $('#s2').append('<option value="">--请选择--</option>')
        if(data != 'error')
        {
            $.each(data, function(key, val) {
                $('#s2').append('<option value="'+val.id+'">[第'+val.number+'章]'+ val.title2+'</option>');
            });
        }
    });
});
</script>
                  <!-- 删除与推送 -->
<script type="text/javascript">
    function jpush_del() { 

    var msg = "您真的确定要删除吗？\n\n请确认！"; 
    if (confirm(msg)==true){ 
            return true; 
        }else{ 
            return false; 
        } 
    }
</script>
        <script src="__PUBLIC__/admin/js/bootstrap.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.webui-popover.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.ui.widget.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.fileupload.min.js"></script>
        <script src="__PUBLIC__/admin/js/ace-elements.min.js"></script>
        <script src="__PUBLIC__/admin/js/ace.min.js"></script>
        <script src="__PUBLIC__/admin/js/elements.onpage-help.js"></script>
        <script src="__PUBLIC__/admin/js/ace.onpage-help.js"></script>
<div class="modal-backdrop fade in" style="display:none;background:rgba(0,0,0)"></div>
</body>
</html>
